//
//  DOMParser.h
//  PriceOnline
//
//  Created by Phuong Dinh Le on 1/17/13.
//  Copyright (c) 2013 WorkLikeDance. All rights reserved.
//
//  Wrapper libxml2.dylib

#import <libxml/tree.h>
#import <libxml/parser.h>
#import <libxml/HTMLparser.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>

#define KEY_NODE_NAME @"nodeName"
#define KEY_NODE_ATTRIBUTE @"attributeDictionary"   //@"nodeAttributeArray"
#define KEY_NODE_CONTENT @"nodeContent"
#define KEY_NODE_CHILD @"nodeChildArray"

#define KEY_ATTRIBUTE_NAME @"attributeName"
#define KEY_ATTRIBUTE_CONTENT @"attributeContent"

#define KEY_NODE_CONTENT_NAME @"text"

@interface DOMParser : NSObject

+ (NSArray*) queryHTMLElementsByXPath:(NSString *)document xpath:(NSString *)xpath namespaceS:(NSString*)namespaceS namespaceNS2:(NSString*)namespaceNS2;
+ (NSArray*) queryXMLNodesByXPath:(NSString *)document xpath:(NSString *)xpath namespaceS:(NSString*)namespaceS namespaceNS2:(NSString*)namespaceNS2;
@end